package water_qanxun_api.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@TableName("t_devices_data")
@Data
public class DevicesDataDomain {
    @TableId(value = "id", type = IdType.AUTO)  // 设置id策略为自增
    private Integer id;
    // 时间戳
    @TableField("timestamp")
    private Long timestamp;
    // 设备mac地址
    private String deviceKey;
    // 消息
    private String sensorData;
    
    public DevicesDataDomain(Long timestamp, String deviceKey, String sensor_data) {
        this.timestamp = timestamp;
        this.deviceKey = deviceKey;
        this.sensorData = sensor_data;
    }
    
    public DevicesDataDomain() {
    }
}
